import layoutHeaderAside from '@/layout'
const meta = { auth: true }

export default {
    path: '/knowledge',
    name: 'knowledge',
    meta,
    redirect: { name: "knowledge-exhaustgas" },
    component: layoutHeaderAside,
    children: (pre => [
        // {
        //     path: 'index',
        //     name: `${pre}index`,
        //     component: () => import('@/views/knowledge'),
        //     redirect: { name: 'home' },
        //     meta: {
        //         ...meta,
        //         title: "首页",
        //         img: require('@/assets/pollution/首页.png'),
        //         isMenu: true
        //     }
        // },
        {
            path:'solution',
            name:`${pre}solution`,
            component:{ render(c) { return c('router-view') } },
            meta:{
                ...meta,
                title:'故障解决方案',
                img: require('@/assets/public/故障解决方案.png'),
                isMenu: true
            },
            children:[
                {
                    path:"exhaustgas",
                    name:`${pre}exhaustgas`,
                    component:()=>import('@/views/knowledge/solution/Exhaustgas'),
                    meta:{
                        ...meta,
                        title:"污染源",
                        isMenu:true
                    }
                },
                {
                    path:"waterquality",
                    name:`${pre}waterquality`,
                    component:()=>import('@/views/knowledge/solution/Waterquality'),
                    meta:{
                        ...meta,
                        title:"水站",
                        isMenu:true
                    }
                },
                {
                    path:"airstation",
                    name:`${pre}airstation`,
                    component:()=>import('@/views/knowledge/solution/Airstation'),
                    meta:{
                        ...meta,
                        title:"空气站",
                        isMenu:true
                    }
                },
                {
                    path:"managefault",
                    name:`${pre}managefault`,
                    component:()=>import('@/views/knowledge/solution/Managefault'),
                    meta:{
                        ...meta,
                        title:"解决方案管理",
                        isMenu:true
                    }
                }
            ]
        },
        {
            path:"technical",
            name:`${pre}technical`,
            component:{ render(c) { return c('router-view') } },
            meta:{
                ...meta,
                title:"技术讨论区",
                img: require('@/assets/public/技术讨论区.png'),
                isMenu: true
            },
            children:[
                {
                    path:'browse',
                    name:`${pre}browse`,
                    component:()=>import('@/views/knowledge/technical/Technical'),
                    meta:{
                        ...meta,
                        title:"技术讨论浏览",
                        isMenu:true
                    }
                },
                {
                    path:'cms',
                    name:`${pre}cms`,
                    component:()=>import('@/views/knowledge/technical/Cms'),
                    meta:{
                        ...meta,
                        title:"内容管理",
                        isMenu:true
                    }
                },
                {
                    path:'more',
                    name:`${pre}more`,
                    component:()=>import('@/views/knowledge/technical/more'),
                    meta:{
                        ...meta,
                        title:"查看",
                        isMenu:false
                    }
                }
            ]
        },
        {
            path:"training",
            name:`${pre}training`,
            component:{ render(c) {return c('router-view') } },
            meta:{
                ...meta,
                title:"培训学习资料",
                img: require('@/assets/public/培训学习资料.png'),
                isMenu: true
            },
            children:[
                {
                    path:'airclass',
                    name:`${pre}airclass`,
                    component:()=>import('@/views/knowledge/training/Airclass'),
                    meta:{
                        ...meta,
                        title:"空中课堂",
                        isMenu:true
                    }
                },
                {
                    path:'manage',
                    name:`${pre}manage`,
                    component:()=>import('@/views/knowledge/training/manage'),
                    meta:{
                        ...meta,
                        title:"资料管理",
                        isMenu:true
                    }
                },
                {
                    path:'more',
                    name:`${pre}more`,
                    component:()=>import('@/views/knowledge/training/more'),
                    meta:{
                        ...meta,
                        title:"查看",
                        isMenu:false
                    }
                }
            ]
        },

        // {
        //     path:"maintenance",
        //     name:`${pre}maintenance`,
        //     component:{ render(c) {return c('router-view') } },
        //     meta:{
        //         ...meta,
        //         title:"石化企业运维",
        //         img: require('@/assets/home/水站平台.png'),
        //         isMenu: true
        //     },
        //     children:[
        //         {
        //             path:'information',
        //             name:`${pre}information`,
        //             component:()=>import('@/views/knowledge/maintenance/information'),
        //             meta:{
        //                 ...meta,
        //                 title:"企业信息维护",
        //                 isMenu:true
        //             }
        //         },
        //         // {
        //         //     path:'search',
        //         //     name:`${pre}search`,
        //         //     component:()=>import('@/views/knowledge/maintenance/search'),
        //         //     meta:{
        //         //         ...meta,
        //         //         title:"监测数据查询",
        //         //         isMenu:true
        //         //     }
        //         // }
        //     ]
        // }

    ])('knowledge-')
}
